package org.linlinjava.litemall.db.dao;

import org.apache.ibatis.annotations.Param;
import org.linlinjava.litemall.db.domain.LitemallSeat;

import java.util.List;

public interface SeatMapper {

    /**
     * 根据条件查询是否可订座
     * @param userId
     * @param type
     * @param minCount
     * @param maxCount
     * @param storeId
     * @param preference
     * @param orderTime
     * @param orderRange
     * @return
     */
    long selectSeatDetail(@Param("userId") Integer userId, @Param("type")String type, @Param("minCount")Integer minCount, @Param("maxCount")Integer maxCount, @Param("storeId")Integer storeId, @Param("preference")String preference, @Param("orderTime")String orderTime, @Param("orderRange")Integer orderRange);

    List<Integer> selectAvailableSeat(@Param("userId") Integer userId, @Param("type")String type,  @Param("seatId")Integer seatId, @Param("storeId")Integer storeId, @Param("orderTime")String orderTime, @Param("orderRange")Integer orderRange);


    List<LitemallSeat> selectByExample(@Param("name") String name, @Param("storeId")Integer storeId, @Param("sort") String sort, @Param("order") String order);
}
